//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { UctooRole, UctooRoleResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooUctooRoleList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<UctooRoleResponse>(`/uctoo/uctoo_role/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooUctooRole = async (id: string) => {
  return requestClient.get<UctooRole>(`/uctoo/uctoo_role/${id}`);
};

export const adductooUctooRole = async (data: Partial<UctooRole>) => {
  return requestClient.post<UctooRole>('/uctoo/uctoo_role/add', data);
};

export const edituctooUctooRole = async (data: Partial<UctooRole>) => {
  return requestClient.post<UctooRole>('/uctoo/uctoo_role/edit', data);
};

export const deleteuctooUctooRole = async (id: string) => {
  return requestClient.post<any>('/uctoo/uctoo_role/del', { id });
};
